

package com.zdsx.service;

import com.zdsx.common.service.BaseService;
import com.zdsx.dto.BindPhoneDTO;
import com.zdsx.dto.WxLoginDTO;
import com.zdsx.entity.UserEntity;
import com.zdsx.dto.LoginDTO;

import java.util.Map;

/**
 * 用户
 * 
 * @author Lr
 */
public interface UserService extends BaseService<UserEntity> {



	UserEntity getByMobile(String mobile);

	UserEntity getByOpenId(String mobile);

	UserEntity getUserByUserId(Long userId);

	/**
	 * 用户登录
	 * @param dto    登录表单
	 * @return        返回登录信息
	 */
	Map<String, Object> login(LoginDTO dto);

	/**
	 * wx小程序登陆
	 * @param dto
	 * @return
	 */
	Map<String, Object> wxLogin(WxLoginDTO dto);

	/**
	 * 绑定手机号码
	 * @param userId
	 * @param phoneNum
	 */
	void bindPhone(Long userId, BindPhoneDTO phoneNum);

	/**
	 * 发送验证码
	 * @param userId
	 * @param mobile
	 * @param type
	 */
	Map<String, String> sendVerifySms(Long userId, String mobile, String type);

	String getUserRole(Long userId);

	String getUserRole(String mobile);
}
